<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>我的订单</title>

    <!-- Meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="Portal - Bootstrap 5 Admin Dashboard Template For Developers">
    <meta name="author" content="Xiaoying Riley at 3rd Wave Media">
    <link rel="shortcut icon" href="favicon.ico">

    <!-- FontAwesome JS-->
    <script defer src="/assets/plugins/fontawesome/js/all.min.js"></script>

    <!-- App CSS -->
    <link id="theme-style" rel="stylesheet" href="/assets/css/portal.css">

</head>

<body class="app">
<header th:replace="template.html::header"></header><!--//app-header-->

<div class="app-wrapper">

    <div class="app-content pt-3 p-md-3 p-lg-4">
        <div class="container-xl">

            <div class="row g-3 mb-4 align-items-center justify-content-between">
                <div class="col-auto">
                    <h1 class="app-page-title mb-0">我的订单</h1>
                </div>
            </div><!--//row-->

            <div class="tab-content" id="orders-table-tab-content">
                <div class="tab-pane fade show active" id="orders-all" role="tabpanel" aria-labelledby="orders-all-tab">
                    <div class="app-card app-card-orders-table shadow-sm mb-5">
                        <div class="app-card-body">
                            <div class="table-responsive">
                                <table class="table app-table-hover mb-0 text-left">
                                    <thead>
                                    <tr>
                                        <th class="cell">订单号</th>
                                        <th class="cell">订单类型</th>
                                        <th class="cell">商品名</th>
                                        <th class="cell">时间</th>
                                        <th class="cell">交易价格</th>
                                        <th class="cell">交易数量</th>
                                        <th class="cell">总价</th>
                                    </tr>
                                    </thead>
                                    <tbody id="list">
                                    <tr th:each="order : ${orders}"
                                        th:style="${orderStat.index < 12 ? '' : 'display: none'}">
                                        <td class="cell" th:text="${order.getOid()}"></td>
                                        <td class="cell">
                                            <span class="truncate" th:text="${order.transType()}"></span>
                                        </td>
                                        <td class="cell" th:text="${order.getName()}"></td>
                                        <td class="cell"
                                            th:text="${#dates.format(order.getTime(), 'yyyy-MM-dd HH:mm:ss')}"></td>
                                        <td class="cell" th:text="${order.getPrice()} + '元'"></td>
                                        <td class="cell" th:text="${order.getCount()}"></td>
                                        <td class="cell"
                                            th:text="${order.getPrice() * order.getCount()} + '元'"></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div><!--//table-responsive-->
                        </div><!--//app-card-body-->
                    </div><!--//app-card-->
                    <nav class="app-pagination mt-5">
                        <ul class="pagination justify-content-center" id="pager"></ul>
                    </nav><!--//app-pagination-->
                </div><!--//tab-pane-->
            </div><!--//tab-content-->


        </div><!--//container-fluid-->
    </div><!--//app-content-->

</div><!--//app-wrapper-->

<!-- Javascript -->
<script src="/assets/plugins/popper.min.js"></script>
<script src="/assets/plugins/bootstrap/js/bootstrap.min.js"></script>

<!-- Page Specific JS -->
<script src="/assets/js/app.js"></script>
</body>
</html> 
